# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=egl-wayland
pkgver=1.1.7
pkgrel=1
epoch=1
pkgdesc="EGLStream-based Wayland external platform"
arch=(x86_64)
url=https://github.com/NVIDIA/egl-wayland
license=(MIT)
depends=(wayland eglexternalplatform)
makedepends=(meson git wayland-protocols 'libglvnd>=1.3.4')
provides=(libnvidia-egl-wayland.so)
_commit=db7f6d80aa4221d51088b0b70a730ce95ca42d6c  # tags/1.1.7
source=("git+$url#commit=$_commit"
        10_nvidia_wayland.json)
sha256sums=('SKIP'
            '5cccf1905a266e8e34d5ad4aad4be85390e60b1a0850a29dd9d64adc641de412')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
  install -Dt "$pkgdir/usr/share/egl/egl_external_platform.d" -m644 10_nvidia_wayland.json
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 $pkgname/COPYING
}

# vim:set sw=2 et:
